const server = require('server')
const defaults = require('./defaults')
const success = require('../utils/success')

const {get, post} = server.router
const {json} = server.reply

module.exports = [
  get('/', ctx => json(success(ctx.query))),
  post('/', ctx => json(success(ctx.data))),
  ...defaults
]
